package com.example.library.util;

import com.example.library.bean.model.Book;
import com.example.library.bean.model.FavoriteOrder;

import java.util.ArrayList;
import java.util.List;

public class ListUtil {
    public static List<Book> favoriteToBook(List<FavoriteOrder> favoriteOrders) {
        List<Book> books = new ArrayList<>();
        for(FavoriteOrder order : favoriteOrders) {
            books.add(order.getBook());
        }
        return books;
    }
}
